<template>
    <div>
         <h1>页面1</h1>
         <router-link to="/about">练习</router-link>
         <button @click="tiao()">跳转</button>
    </div>
</template>
<script>
import { useRouter } from 'vue-router';

export default{
    setup(){
        let router = useRouter()//跳转
        function tiao(){
            router.push({
            path:'/exer',
            query:{
               id:888
            }
         })
        }
        return{tiao,}
    }
}
</script>